<template>
	<view>
		<button @click="yz">点我</button>
		<view v-for="(item,index) in local" :key="item.index">{{item}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				msg:"18760960842",
				s:[],
				local:[]
			}
		},
		methods: {
			yz(){
				console.log(6365535453)
				uni.request({
					// url:'http://localhost:10200/api/v1/account/login/password',
				 url:'http://175.24.175.35:10200/api/v1/city/',
							method: 'GET',
						 //    data:{
							// 	// "userPhone":this.msg
							// 	"phone": "15911245016",
							// 	  "password": "123456789"
							// },
						
							success: (res) => {
								// this.rm = res.data.data
								console.log('123')
								// for( let a in res.data.Data.data.data){
								// 	console.log(a)
								// }
								console.log(res.data.Data.data.data)
								this.s=res.data.Data.data.data
								for(var num=0;num<this.s.length;num++){
									//console.log(res.data.Data.data.data[num].name)
									var aa=res.data.Data.data.data[num].name
									var bb=aa.split(";")
									var cc=bb[bb.length-1]
									this.local[num]=cc
									console.log(cc)
								}
								console.log(this.local)
								
								
								
							},
							fail: (err) => {
								console.log(err)
							}
						
					})
			}
		}
	}
</script>

<style>

</style>


 
<!-- <template>
 	<view class="container">
 		<view class="intro-wrap">
 			<view class="intro-title">登录之后更精彩</view>
 			<view class="intro-text">与全世界精彩的经历、人和故事相遇</view>
 		</view>
 
 		<view class="login-wrap">
 			<view class="item">
 				<input type="text" placeholder="手机号" placeholder-style="color: #fff" v-model="userPhone" maxlength="11">
 			</view>
 			<view class="item">
 				<input type="text" placeholder="验证码" placeholder-style="color: #fff">
 				<view class="btn"><span @click="yz">获取验证码</span></view>
 			</view>
 			<view class="submit" @click="submit">验证并登录</view>
 		</view>
 		<view class="other-wrap">
 			<view class="other-title">其他登录方式</view>
 			<view class="other-icon">
 				<view class="item">
 					<image src="../../static/01.jpg" mode=""></image>
 				</view>
 				<view class="item">
 					<image src="../../static/02.jpg" mode=""></image>
 				</view>
 			</view>
 			<view class="agreement-wrap">
 				<checkbox class="mycheck" value="cb" checked="true" />
 				<view class="agreement-text">我已同意《用户协议》</view>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
 	export default {
 		data() {
 			return {
 				title: 'Hello',
 				code: '',
 				userPhone: "18760960842"
 			}
 		},
 		methods: {
 			yz() {
 			// 	console.log("验证码为：" + this.code)
				// console.log(34366436463473)
 			// 	uni.request({
 			// 			// header: {
 			// 			// 	'Content-Type': 'application/x-www-form-urlencoded'
 			// 			// },
 			// 			url: 'http://microtourism.natapp1.cc/api-user/verification-code',
 			// 			method: 'POST',
 			// 			data: {
 			// 				"userPhone": this.userPhone
 			// 			},
 			// 			success: (res) => {
 			// 				// this.rm = res.data.data
 			// 				console.log(this.userPhone)
 			// 				console.log(748834834828382)
 			// 				console.log(res)
 			// 				console.log("验证码为：" + this.code)
 			// 			},
 			// 			fail: (err) => {
 			// 				console.log(err)
 			// 			}
 			// 		}),
 			// 		console.log(res.code)
 			},
 			submit() {
 				uni.navigateTo({
 					url: ''
 				})
 			}
 		}
 	}
 </script>
 
 <style>
 	/* @import "./login.css"; */
 </style>
 -->